package com.bruceliu.service.impl;

import com.bruceliu.bean.FoodType;
import com.bruceliu.mapper.FoodTypeMapper;
import com.bruceliu.service.FoodTypeService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @BelongsProject: RestaurantSystem
 * @BelongsPackage: com.bruceliu.service.impl
 * @Author: bruceliu
 * @QQ:1241488705
 * @CreateTime: 2020-02-29 12:53
 * @Description: TODO
 */
@Service
public class FoodTypeServiceImpl implements FoodTypeService {

    @Resource
    FoodTypeMapper foodTypeMapper;

    @Override
    public int addFoodType(FoodType foodType) {
        return foodTypeMapper.addFoodType(foodType);
    }

    @Override
    public int deleteFoodType(int id) {
        return foodTypeMapper.deleteFoodType(id);
    }

    @Override
    public int updateFoodType(FoodType foodType) {
        return foodTypeMapper.updateFoodType(foodType);
    }

    @Override
    public List<FoodType> getFoodTypes(FoodType foodType) {
        return foodTypeMapper.getFoodTypes(foodType);
    }

    @Override
    public FoodType getById(int id) {
        return foodTypeMapper.getById(id);
    }

    @Override
    public List<FoodType> getAllFoodTypes() {
        return foodTypeMapper.getAllFoodTypes();
    }
}
